/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.ufba.lasid.base;

import br.ufba.lasid.base.api.IResource;
import br.ufba.lasid.base.api.IResourceFactory;
import br.ufba.lasid.comm.HostFactory;

/**
 *
 * @author aliriosa
 */
public class ResourceFactory implements IResourceFactory{

    @Override
    public IResource create(String resourceID) throws Exception{
            
        IResource resource = new Resource(resourceID);
        
        return resource;
    }
    
    public static IResourceFactory getResourceFactory(IResource.Kinds resourceType){             
        
        switch(resourceType){
            case Host:
                return new HostFactory();
            case VirtualMachine:
                return null;
            default:
                return new ResourceFactory();
        }
    } 
    
    
}
